Method Namespaces(params (string Prefix, string Uri)[])

Assembly: redb.Route.XPath2.dll

Builds a namespace resolver from prefix/URI pairs, for the constructor.

public static IXmlNamespaceResolver Namespaces(params (string Prefix, string Uri)[] namespaces)

Remarks

There is deliberately no fluent WithNamespaces(...) here, unlike the XPath 1.0
expression. XPath 2.0 resolves prefixes when the expression is compiled, and this
type compiles in its constructor so a bad path fails the route build rather than the first
message. A prefix therefore has to be known before the object exists; a fluent method could
only ever run after the constructor had already rejected the path, so it would be a method
that cannot work.